
module Cms
  class Document < Fragment

    state_defined_by :uuid => nil

    def build
       e :script, "
        dcat_instance.oninit(function() {
          console.log('NEW container');
          new Cat.fragment.Document(document.getElementById('#{id}'), #{options});
        });
      "
    end
  end
end